cmake_minimum_required(VERSION 2.8.4)

PROJECT(fbrender)

SET(TOPDIR ${fbrender_SOURCE_DIR})
SET(CMAKE_LEGACY_CYGWIN_WIN32 0)

set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${TOPDIR}/build/bin")

INCLUDE_DIRECTORIES(${TOPDIR}/include)

IF(${UNIX})
	ADD_DEFINITIONS(-D_UNIX_)
	SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
ENDIF(${UNIX})

IF(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
	ADD_DEFINITIONS(-D_LINUX_)
ENDIF(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")

IF(${WIN32})
	ADD_DEFINITIONS(-D_WIN32_)
ENDIF(${WIN32})

IF(${CYGWIN})
	ADD_DEFINITIONS(-D_CYGWIN_)
ENDIF(${CYGWIN})

ADD_SUBDIRECTORY(src lib)
ADD_SUBDIRECTORY(examples bin)
